package br.org.blacklist.web.template;

import org.apache.wicket.markup.html.IHeaderContributor;
import org.apache.wicket.markup.html.IHeaderResponse;
import org.apache.wicket.markup.html.WebPage;

import br.org.blacklist.formee.FormeeResourceReference;
import br.org.blacklist.formee.FormeeResourceReference.FormeeDependency;
import br.org.blacklist.web.BlacklistPoliticoSession;

import com.jquery.JQueryResourceReference;
import com.jquery.JQueryResourceReference.Version;

public abstract class BlacklistTemplateWebPageAbstract extends WebPage implements IHeaderContributor {

    private static final long serialVersionUID = 1L;

    protected static final String MENSAGEM_SUCESSO = "mensagem.sucesso";

    protected static final String MENSAGEM_ERRO = "mensagem.erro";

    public BlacklistPoliticoSession getBlacklistSession() {
        return (BlacklistPoliticoSession) getSession();
    }

    @Override
    public void renderHead(IHeaderResponse response) {
        response.renderJavaScriptReference(new JQueryResourceReference(Version.V1_6_3));
        response.renderJavaScriptReference(new FormeeResourceReference(FormeeDependency.FORMEE_JS));
        response.renderCSSReference(new FormeeResourceReference(FormeeDependency.FORMEE_STRUCTURE_CSS));
        response.renderCSSReference(new FormeeResourceReference(FormeeDependency.FORMEE_STYLE_CSS));
    }

}
